
//轮播图效果
$.ajax({
    url: 'http://192.168.151.73:8888/api/swipers',
    success: function (res) {
        console.log(res)
        if (res.status === 0) {
            let str = ''
            res.data.forEach(item => {
                // console.log(item.swiperimg);
                // console.log(item)
                str += `
                    <li class="img-effect">
                    <a href="javascript:;">
                    <img src="${'http://192.168.151.73:8888/uploads/' + item.swiperimg}" alt="">
                    </a>
                    </li>
                `
            })
            $('#kr_carousel ul').html(str)
            //轮播交互
            carousel.render({
                elem: '#kr_carousel',
                width: 720,
                height: 300,
                interval: 3000
              })
        } 
    }
})
//合作伙伴展示
$.ajax({
    url: 'http://192.168.151.73:8888/api/links',
    success: function (res) {
        // console.log(res)
        if (res.status === 0) {
            let str = ''
            res.data.forEach((item) => {
                str += `
                    <dd>
                    <a href="javascript:;">
                    <img src="${'http://192.168.151.73:8888/uploads/' + item.linkicon}" alt="">
                    </a>
                    </dd>`
            })
            $('.kr_collaborator').append(str)
        }
    }
})
